namespace CSharpPro;

public class work2
{
    static void main()
    {
        Console.WriteLine("100以内的质数有：");
        
        
        for (int i = 2; i <= 100; i++)
        {
            bool isPrime = true;
            
            
            for (int j = 2; j <= Math.Sqrt(i); j++)
            {
                if (i % j == 0)
                {
                    isPrime = false;
                    break; 
                }
            }
            
            if (isPrime)
            {
                Console.Write(i + " ");
            }
        }
    }
}